package com.cg.cn.p2_HomeWork;

public class Test02 {
    public static void main(String[] args) {
        int[] n = {68, 27, 95, 88, 171, 996, 51, 210};
        System.out.println("元素和:" + getArraySum(n));
    }

    public static int getArraySum(int[] n) {
        int sum = 0;
        for (int i = 0; i < n.length; i++) {
            int ge = n[i] % 10;
            int shi = n[i] / 10 % 10;
            if ((ge != 7 && shi != 7) && n[i] % 2 == 0) {
                sum += n[i];
            }
        }
        return sum;
    }
}


